﻿@model LynxWiki.ViewModels.AttachmentViewData
@using LynxWiki.ViewModels

@{
    ViewBag.Title = "CheckInUpload";
}

<h2>CheckIn Upload</h2>
@using (Html.BeginForm("CheckInUpload", "Attachment", FormMethod.Post, new { id = "FileUpload", enctype = "multipart/form-data" })) {
    @Html.Label("Filename :") <input type="file" name="file" id="file" /> <input type="submit" value="Upload" />
    @Html.Label("Namespace : ", new { @class = "inline" }) @Html.DropDownListFor(model => model.NamespaceSelected, (IEnumerable<SelectListItem>) ViewBag.ListNamespaces)  <br />
    <div id="ErrorMsgDiv" ></div>
    @Html.DisplayFor(m => m.FileUploadResult)<br />
    @Html.LabelFor(model => model.VersionNote)
    @Html.TextAreaFor(model => model.VersionNote)<br />
    @Html.LabelFor(model => model.Tags)
    @Html.TextAreaFor(model => model.Tags)
    <div><a id="slick-toggle_privs" href="#">Manage Privileges</a>
    <div id="slickbox_privs">@Html.Label("Allow Edit Users")
    @Html.TextBoxFor(model => model.ListAllowEditUser)<br />
    @Html.Label("Allow Edit Roles")
    @Html.TextBoxFor(model => model.ListAllowEditRole)<br />
    @Html.Label("Deny Read Users")
    @Html.TextBoxFor(model => model.ListDenyReadUser)<br />
    @Html.Label("Deny Read Roles")
    @Html.TextBoxFor(model => model.ListDenyReadRole)<br /></div></div>
    <input type="hidden" name="FileNameIn" value="@ViewBag.FileNameIn" />
    <input type="hidden" name="DirectoryPathIn" value="@ViewBag.DirectoryPathIn" />
    <input type="hidden" name="NamespaceIn" value="@ViewBag.NameSpaceIn" />

}
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/jqueryui")
@section Scripts {
    <script type="text/javascript" >
        $(document).ready(function () {
            $('#ErrorMsgDiv').hide();
            $('#slickbox_privs').hide();
            $('#slick-toggle_privs').click(function () {
                $('#slickbox_privs').toggle(400);
                return false;
            });
        });
    </script>
}